package com.zdsoft.finance.product.repository;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import com.zdsoft.finance.common.base.CustomRepository;
import com.zdsoft.finance.product.entity.ProductBusiness;

/**
 * 产品业务操作仓库
 * @author longwei
 * @date 2016/11/21
 * @version 1.0
 */
public interface ProductBusinessRepository extends CustomRepository<ProductBusiness, String>{

	/**
	 * 通过产品id查找产品业务
	 * @param productId 产品id
	 * @return 产品业务实体
	 */
	@Query("select t from ProductBusiness t where t.product.id=:productId")
	public ProductBusiness findByProductId(@Param("productId")String productId);
}
